<?php

use App\Admin\Controllers\Ai\AiAppController;
use App\Admin\Controllers\Ai\AiGroupController;
use App\Admin\Controllers\Ai\FlagStudio\StyleController as FlagStudioStyleController;
use App\Admin\Controllers\Ai\FlagStudio\PromptController as FlagStudioPromptController;
use App\Admin\Controllers\Article\ArticleController;
use App\Admin\Controllers\Article\CateController as ArticleCateController;
use App\Admin\Controllers\Audio\AudioResourceController;
use App\Admin\Controllers\Audio\AudioTagController;
use App\Admin\Controllers\Config\BannerController;
use App\Admin\Controllers\Config\MenuController;
use App\Admin\Controllers\Config\SysConfigController;
use App\Admin\Controllers\Document\DocumentController;
use App\Admin\Controllers\Document\GroupController as DocumentGroupController;
use App\Admin\Controllers\Emo\GroupController as EmoGroupController;
use App\Admin\Controllers\Emo\ImageController;
use App\Admin\Controllers\Emo\TagController;
use App\Admin\Controllers\HomeController;
use App\Admin\Controllers\Image\AuditController;
use App\Admin\Controllers\Image\ImageController as ImageImageController;
use App\Admin\Controllers\Image\ItemController;
use App\Admin\Controllers\Image\SeriesController;
use App\Admin\Controllers\Image\SubjectController as ImageSubjectController;
use App\Admin\Controllers\Link\LinkController;
use App\Admin\Controllers\Message\TemplateConfigController;
use App\Admin\Controllers\Message\TemplateHistoryController;
use App\Admin\Controllers\Source\CategoryController as SourceCategoryController;
use App\Admin\Controllers\Source\ItemController as SourceItemController;
use App\Admin\Controllers\User\AuthorController;
use App\Admin\Controllers\User\ChannelController as UserChannelController;
use App\Admin\Controllers\User\ProfessionController as UserProfessionController;
use App\Admin\Controllers\User\ScoreHistoryController as UserScoreHistoryController;
use App\Admin\Controllers\User\UserController;
use App\Admin\Controllers\Video\VideoController;
use App\Admin\Controllers\Video\VideoItemController;
use App\Admin\Controllers\Video\VideoTagController;
use Encore\Admin\Facades\Admin;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;

Admin::routes();

Route::group([
    'prefix' => config('admin.route.prefix'),
    //    'namespace'     => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
    'as' => config('admin.route.prefix') . '.',
], function (Router $router) {
    $router->get('/', [HomeController::class, "index"])->name('home');
    $router->resource("image/series", SeriesController::class);
    $router->resource("image/audit", AuditController::class);
    $router->resource("image/list", ImageImageController::class);
    $router->resource("image/item/list", ItemController::class);
    $router->resource("image/subject", ImageSubjectController::class);

    $router->resource("documents/group", DocumentGroupController::class);
    $router->resource("documents", DocumentController::class);

    $router->resource("user/author", AuthorController::class);
    $router->resource("user/list", UserController::class);
    $router->resource("user/profession", UserProfessionController::class);
    $router->resource("user/channel", UserChannelController::class);
    $router->resource("user/score/history", UserScoreHistoryController::class);

    $router->resource("emo/group", EmoGroupController::class);
    $router->resource("emo/list", ImageController::class);
    $router->resource("emo/tag", TagController::class);

    $router->resource("menu/list", MenuController::class);
    $router->resource("banner", BannerController::class);
    $router->resource("sys/config", SysConfigController::class);
    $router->resource("relation/link", LinkController::class);

    $router->resource("source/category", SourceCategoryController::class);
    $router->resource("source/items", SourceItemController::class);

    $router->resource("ai/group", AiGroupController::class);
    $router->resource("ai/app", AiAppController::class);
    $router->resource("flag/style", FlagStudioStyleController::class);
    $router->resource("flag/prompt", FlagStudioPromptController::class);

    $router->resource("article/cate", ArticleCateController::class);
    $router->resource("article/content", ArticleController::class);

    $router->resource("template/history", TemplateHistoryController::class);
    $router->resource("template/config", TemplateConfigController::class);

    $router->resource("audio/tag", AudioTagController::class);
    $router->resource("audio/resource", AudioResourceController::class);

    $router->resource("video/tag", VideoTagController::class);
    $router->resource("video/list", VideoController::class);
    $router->resource("video/item", VideoItemController::class);
});
